package com.webapp.domain.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 申请人信息
 * @author zern
 *
 */
@Entity
@Table(name = "proposer")
public class Proposer extends BaseEntity{

	/**
	 * 
	 */
	private static final long serialVersionUID = -2906227231363859721L;

	private Long id;
	
	private Disputes disputes;
	
	private String userName;
	
	private String phone;
	
	private String type;
	
	private String mail;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name = "id")	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "disputes_id", referencedColumnName = "id")
	@JSONField(serialize = false)
	public Disputes getDisputes() {
		return disputes;
	}

	public void setDisputes(Disputes disputes) {
		this.disputes = disputes;
	}

	@Column(name = "user_name", length = 50)
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "phone", length = 13)
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(name = "type", length = 2)
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getMail() {
		return mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}
	
	
}
